package exprtree;

import visitor.Visitor;

public class MinusExpr extends Expr {

	private Expr leftExpr;
	private Expr rightExpr;

	/**
	 * MinusExpr
	 * @param left which is an Expr object
	 * @param right which is an Expr object
	 */
	public MinusExpr(Expr left, Expr right){
		this.setLeftExpr(left);
		this.setRightExpr(right);
	}

	/**
	 * setLeftExpr
	 * @param leftExpr which is an Expr object
	 */
	public void setLeftExpr(Expr leftExpr) {
		this.leftExpr = leftExpr;
	}

	/**
	 * getLeftExpr
	 * @return an Expr
	 */
	public Expr getLeftExpr() {
		return leftExpr;
	}

	/**
	 * setRightExpr
	 * @param rightExpr which is an Expr object
	 */
	public void setRightExpr(Expr rightExpr) {
		this.rightExpr = rightExpr;
	}

	/**
	 * getRightExpr
	 * @return an Expr
	 */
	public Expr getRightExpr() {
		return rightExpr;
	}

	/**
	 * accept
	 * @param visitor which is an Visitor object
	 * @return an Object
	 */
	public Object accept(Visitor visitor){
		return visitor.visit(this);
	}
}
